<{if $side == 'sidepanel'}>
<{* <div class="side-menu side-menu-list" >
    <{foreach from=$actions item=action}>
           <div class="side-bx">
            <div class="side-bx-title"><div class="side-bx-title-inner"><h3><a href="?<{$action.menu_path}>"><{$action.menu_title}></a></h3></div></div>
            <div class="side-bx-bd">
            </div>
           </div>
     <{/foreach}>
</div> *}>

<{/if}>
<{if $side == 'leftpanel'}>
<div class="side-bx">
  <ul>
    <{if count($nogroup.menu) > 0}>
    <{foreach from=$nogroup.menu name="menus" item=menu}>
    <li<{if $env.foreach.menus.first}> class="first"<{/if}>><a target="<{$menu.target}>" href="index.php?<{$menu.menu_path}>" mid="<{$menu.menu_id}>"><{t}><{$menu.menu_title}><{/t}></a></li>
    <{/foreach}>
    <{/if}>
    <{foreach from=$menus_data item=menus name=side_menus}>
    <{foreach from=$menus.menu item=menu name=menus}>
    <li<{if !count($nogroup.menu) && $env.foreach.side_menus.first && $env.foreach.menus.first}> class="first"<{/if}>><a target="<{$menu.target}>" href="index.php?<{$menu.menu_path}>" mid="<{$menu.menu_id}>"><{t}><{$menu.menu_title}><{/t}></a></li>
    <{/foreach}>
    <{/foreach}>
  </ul>
</div>

<script>
(function(){
  var mid = '<{$workground.menu_id}>';
  var breadcrumb = BREADCRUMBS.split(':')[1];
  var settings = ['44', '57', '120', '134', '135', '136', '137', '75'];
  if (settings.indexOf(breadcrumb) > -1) {
    mid = '-1';
    BREADCRUMBS = mid + ':' + breadcrumb;
  }
  LAYOUT.aside.getElements('.wg').each(function(el) {
    if(el.hasClass('setting')){
      var link = el.getElement('a').href,
          link = link.slice(link.indexOf('&')+ 5,link.length),
          url = location.href,
          url = url.slice(url.indexOf('&')+ 5,url.length);
      if(link == url){
        setTimeout(function(){
          el.addClass('current');
        },500)
      }
    }
    if (mid && el.get('mid') === mid) {
      el.addClass('current');
    }
    else if(el.hasClass('current')) {
      el.removeClass('current');
    }
  });

  /* $$('.side-bx-title').addEvent('click', function(e){
    e.stop();
    var bx = this.getParent(),
      bd = this.getNext('.side-bx-bd');
    if(bx.hasClass('side-bx-toggled')){
      bd.show();
      bx.removeClass('side-bx-toggled');
    }else{
      bd.hide();
      bx.addClass('side-bx-toggled');
    }
  });  */
})();
window.Breadcrumbs = "<{$dataid}>";
</script>
<{/if}>
